package com.travel.recommend.web;


import com.travel.common.utils.R;
import com.travel.recommend.service.RecommendService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 个性化推荐
 */
@Slf4j
@RestController
public class RecommendController {

    @Autowired
    RecommendService recommendService;

    @RequestMapping("/recommend/{userId}")
    public List<Integer> recommend(@PathVariable("userId")Integer userId){
        // 获取推荐的景点id列表
        List<Integer> recommendIdList = recommendService.recommed(userId);
        return recommendIdList;
    }


}
